//keep if s1bq04==6111 | s1bq04==6112 |   s1bq04==6113 |  s1bq04==6114 |  s1bq04==6130 | s1bq04==6310 |  s1bq04==6330 | s1bq04==9211  | s1bq04==9213 |  s1bq04==9214
// occupations
gen occupation=0			
// market gardner and crop grower
replace	occupation=	11	if s1bq04==	6111
replace	occupation=	11	if s1bq04==	6112
replace	occupation=	11	if s1bq04==	6113
replace	occupation=	11	if s1bq04==	6114
//mixed crops and animal producer
replace	occupation=	6130	if s1bq04==	6130
//subsistance crop farmers
replace	occupation=	6310	if s1bq04==	6310
//subsistance livestock producer 
replace	occupation=	6330	if s1bq04==	6330
//crop farm labourers
replace	occupation=	9211	if s1bq04==	9211
//live stock farm labourer
//replace	occupation=	11	if s1bq04==	9212
//mixed farm and livestock labourere
replace	occupation=	9213	if s1bq04==	9213
//garden and hoticulture labourers
replace	occupation=	9214	if s1bq04==	9214
//agriculture and forestry production manager
//replace	occupation=	13	if s1bq04==	1311
replace occupation=. if occupation==0


// mean monthly wage rate construction

gen wage_monthly= s1bq08
replace wage_monthly=s1bq10/12 if s1bq07==2
replace wage_monthly =s1bq19/12 if s1bq07==3
gen earn_day= wage_monthly/s1bq02
//mean monthly wage  rate and mean per day earning

egen wage_monthly_mean_occup= mean(wage_monthly),by (occupation)
egen earn_day_mean_occup= mean(earn_day),by (occupation)
egen wage_monthly_mean_employ= mean(wage_monthly),by (s1bq06)
egen earn_day_mean_employ= mean(earn_day),by (s1bq06)
//mean working days by occupation

egen work_days_mean_occup= mean(s1bq02),by( occupation)
egen work_days_mean_employ= mean(s1bq02),by( s1bq06) 


ren earn_day pde

egen wage_agliv_occup= mean (pde) if occupation>0 & occupation< .
//daily mean wage rate of agriculture and live stock both combine

//egen wage_agliv_indust= mean (pde) if industry>0 & industry< .


// daily mean wage rate of live stock all togather
egen wage_livestock_all = mean (pde) if occupation==6 | occupation==8
 // daily mean wage rate of crops producers all togather
egen wage_farm_all = mean (pde) if occupation==1 | occupation==2 | occupation==3 | occupation==4 | occupation==7 
//replace	occupation=	13	if s1bq04==	1311 //agri and forestry production managers
//daily mean wage rate of mixed livestock and crops producers
egen wage_mix_all= mean(pde) if occupation==5


// daily mean wage rate of subsistance crops producers
egen wage_crops_sub = mean (pde) if occupation==7
//daily mean wage rate of subsistance livestock producers
egen wage_livestock_sub = mean (pde) if occupation==8
//daily mean wage rate of subsistance mix livestock and crops grower.
egen wage_mix_sub = mean (pde) if occupation==9


// daily mean wage rate of crop farm labour
egen wage_farm_labour = mean (pde) if occupation==10
// daily mean wage rate of livestock labour
egen wage_livestock_labour = mean (pde) if occupation==11
// daily mean wage rate of mixed crops and livestock labour
egen wage_mix_labour = mean (pde) if occupation==12
// daily mean wage rate of garden and horticlulture labour
egen wage_gardhorti_labour = mean (pde) if occupation==14
